]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ci: Test toolbox build when changing build script
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 12 Sep 2025 12:10:11 +0000 (14:10 +0200)
committerMarge Bot <marge-bot@gnome.org>
Sun, 14 Sep 2025 20:35:01 +0000 (20:35 +0000)
The build-toolbox job only runs for main and stable branches, so
we currently only know whether modifications to the build-toolbox
script actually work once they a merged.

To catch errors up-front, do test builds of the toolbox image
when a merge request modifies the build script.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3875>

.gitlab-ci.yml

index 43562aaf6026637eff29b7da29ab54a747d5df2d..89533d39f46f70fea9fa4b320106040889be8416 100644 (file)
@@ -335,7 +335,7 @@ pages:
   stage: deploy
   needs: []
   script:
-    - .gitlab-ci/build-toolbox-image.sh $MUTTER_CI_IMAGE
+    - .gitlab-ci/build-toolbox-image.sh $MUTTER_CI_IMAGE $MUTTER_BRANCH
 
 build-toolbox:
   extends:
@@ -343,3 +343,15 @@ build-toolbox:
   rules:
     - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PROJECT_NAMESPACE == "GNOME"'
     - if: '$CI_COMMIT_BRANCH =~ /^gnome-[0-9-]+$/ && $CI_PROJECT_NAMESPACE == "GNOME"'
+
+test-build-toolbox:
+  extends:
+    .build-toolbox
+  variables:
+    MUTTER_BRANCH: "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME"
+    FORCE_REBUILD: 1
+    DRY_RUN: 1
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+      changes:
+        - ".gitlab-ci/build-toolbox-image.sh"